package masterjava.admingui.client.dao;

import com.google.gwt.user.client.rpc.AsyncCallback;
import masterjava.admingui.shared.entity.User;
import masterjava.common.client.gwt.dao.ClientDao;

/**
 * User: Grigory Kislin
 * Date: 29/06/11
 */
public class UserDao extends ClientDao<User, Long> {
    private static UserDao INSTANCE = new UserDao();

    private UserDao() {
        super(User.class);
    }

    public void getByLogin(String login, AsyncCallback<User> callback) {
        findUnique(User.FIND_BY_LOGIN, User.LOGIN, login, callback);
    }

    public static UserDao get() {
        return INSTANCE;
    }
}
